package labox.innovation.gameserver.model.actor.instance;

import labox.innovation.gameserver.model.actor.L2Character;
import labox.innovation.gameserver.model.actor.L2Npc;
import labox.innovation.gameserver.network.L2GameClient;
import labox.innovation.gameserver.network.serverpackets.ActionFailed;
import labox.innovation.gameserver.templates.chars.NpcTemplate;

/**
 *  效果点 实例
 *  当 效果作用于地面 或 其他非游戏中对象时 需要用到
 *  
 *  @author zjj
 *
 */
public class L2EffectPointInstance extends L2Npc
{
    private L2Character _owner;

    public L2EffectPointInstance(long objectId, NpcTemplate template, L2Character owner)
    {
    	super(objectId, template);
    	setIsInvul(false);
    	_owner = owner;
    }
    
    public L2Character getOwner()
    {
    	return _owner;
    }
    
    /**
	 * this is called when a player interacts with this NPC
	 * @param player
	 */
	@Override
	public void onAction(FuzePcInstance player)
	{
		// Send a Server->Client ActionFailed to the L2PcInstance in order to avoid that the client wait another packet
		player.sendPacket(ActionFailed.STATIC_PACKET);
	}
	
	@Override
    public void onActionShift(L2GameClient client)
    {
        FuzePcInstance player = client.getActiveChar();
        if (player == null) return;
        player.sendPacket(ActionFailed.STATIC_PACKET);
    }
	
		
}
